/** 
  取消确认组件
*/
<template>
  <div>
    <el-dialog
      width="25%"
      ref="innerDialog"
      :title="$t('graduateBase.prompt')"
      :visible.sync="innerVisible"
      append-to-body
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :top="'28vh'">
      <div style="text-align: left;margin-bottom: 25px;">{{$t('graduateBase.cancelTip')}}</div>
      <div style="text-align: right;">
        <el-button type="primary" @click="confirmInner('innerDialog')">{{$t('common.btn.confirm')}}</el-button>
        <el-button @click="cancelInner('innerDialog')">{{$t('common.btn.cancel')}}</el-button>
        <el-button v-if="showSaveAndClose" type="primary" @click="confirmAndClose('dialogForm')">{{$t('graduateBase.saveAndClose')}}</el-button>
      </div>
    </el-dialog>
  </div>
</template>
  
<script>
export default {
  components: {
  },
  data () {
    return {
      innerVisible: false
    };
  },
  props: {
    parentInnerVisible: {
      type: Boolean,
      default: false
    },
    showSaveAndClose: {
      type: Boolean,
      default: true
    }
  },
  created() {
   
  },
  methods: {
    // 确认
    confirmInner() {
      this.$emit('confirm-close');
    },
    // 取消
    cancelInner() {
      this.$emit('cancel-to-close');
    },
    // 保存并取消
    confirmAndClose() {
      this.$emit('confirm-and-close');
    }
  },
  watch: {
    parentInnerVisible(newVal) {
      this.innerVisible = newVal;
    }
  }
}
</script>

<style>

</style>